package com.example.dsplatform.Service.ipml;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.dsplatform.pojo.Entity.Student;
import com.example.dsplatform.Dao.Mapper.UserMapper;
import com.example.dsplatform.Service.UserService;
import com.example.dsplatform.pojo.Entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    UserMapper userMapper;

    public void select() {


        List<User> list = userMapper.selectList(null);
        System.out.println(list);

    }

    //    public Map<String, Object> select2login(Integer id , String name){
//        User user = new User();
//        Map<String,Object> map = userMapper.select2login(id ,name);
//        System.out.println(map);
//        return map;
//    }
    public void insert(Integer id, String name) {
        User user = new User();
        /* user.setId(id);*/
        user.setUsername(name);
        int result = userMapper.insert(user);
        System.out.println("result" + result);
        System.out.println(("id+" + user.getId()));
    }


}
